//
//  CYShopViewCell.m
//  CreditAddressBook
//
//  Created by Mr_Chen on 15/9/9.
//  Copyright (c) 2015年 Lee. All rights reserved.
//

#import "CYShopViewCell.h"

@interface CYShopViewCell()
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UILabel *scoreLabel;
@property (weak, nonatomic) IBOutlet UILabel *taskLabel;
@property (weak, nonatomic) IBOutlet UILabel *statusLabel;

@end

@implementation CYShopViewCell

- (void)setModel:(CYShopModel *)model
{
    self.titleLabel.text = model.title ;
    self.scoreLabel.text = [NSString stringWithFormat:@"%d",model.allPoint];
    self.taskLabel.text = [NSString stringWithFormat:@"%@",model.memo];
    self.taskLabel.textColor = [UIColor grayColor];
    //self.titleLabel.font = [UIFont fontWithName:nil size:15];
    self.statusLabel.text= [NSString stringWithFormat:@"完成%d/%d",model.count,model.allCount];
    self.statusLabel.textColor = [UIColor redColor];
    if (model.allCount == model.count) {
        self.statusLabel.textColor = [UIColor blackColor];
        self.statusLabel.text = @"已完成  ✓";
    }
    
    if (model.type == 4|model.type == 6) {
        self.statusLabel.text = @"不限次  ✐";
        self.statusLabel.textColor = CYColor(100, 200, 100, 1);
        //测试信息
    }
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
